package routers

import (
	"beegodemo04/controllers"
	beego "github.com/beego/beego/v2/server/web"
)

func init() {
	beego.Router("/", &controllers.MainController{})
	beego.Router("/book/getBookById", &controllers.BookController{}, "get:GetBookById")
	beego.Router("/book/getBookById2/?:name/?:age", &controllers.BookController{}, "get:GetBookById2")

	// POST 请求传参
	beego.Router("/book/saveBook", &controllers.BookController{}, "post:SaveBook")
}
